package com.ttwm.service;

import com.ttwm.dao.CommentDao;
import com.ttwm.pojo.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImp implements CommentService{
    @Autowired
    private CommentDao commentDao;


    @Override
    public int addComment(Comment comment) {
        return commentDao.addComment(comment);
    }

    @Override
    public List<Comment> commentList(Comment comment) {
        return commentDao.commentList(comment);
    }

    @Override
    public Comment oneComment(Comment comment) {
        return commentDao.oneComment(comment);
    }

    @Override
    public int deleteComment(Comment comment) {
        return commentDao.deleteComment(comment);
    }

    @Override
    public int updateComment(Comment comment) {
        return commentDao.updateComment(comment);
    }

    @Override
    public int deleteCommentAll(Comment comment) {
        return commentDao.deleteCommentAll(comment);
    }
}
